#!/bin/bash
echo -n "Enter New Version Number:"
read VERSION

echo "Building WiiPoker Src and Main Release Version ${VERSION}"
make clean
tar -czvf ../WiiPoker-${VERSION}-src.tar.gz .
mv ../WiiPoker-${VERSION}-src.tar.gz .
make
mkdir WiiPoker
cp WiiPoker.elf WiiPoker/boot.elf
cp release/icon.png WiiPoker/
cp release/meta.xml WiiPoker/
tar -czvf WiiPoker-${VERSION}.tar.gz WiiPoker
rm -rf WiiPoker
make clean
echo "Done."
